#include "mycombobox.h"

#include <QMouseEvent>

MyComboBox::MyComboBox(QWidget *parent):QComboBox(parent)
{

}

void MyComboBox::mousePressEvent(QMouseEvent *e)
{
    if(e->button() == Qt::LeftButton)       //判断鼠标左键是否按下
    {
        emit refresh();             //发送刷新信号
    }
    QComboBox::mousePressEvent(e);  //调用基类的mousePressEvent方法，确保默认行为仍然被执行
}
